from typing import Union, Optional, Iterable, Iterator, SupportsInt


class bitarray:

    def __init__(self, initial: Optional[Union[int, str, Iterable]] = ...) -> None: ...
    def __iter__(self) -> Iterator[bool]: ...

    def tobytes(self) -> bytes: ...
    def frombytes(self, data: bytes) -> None: ...
    def append(self, item: SupportsInt) -> None: ...
